#pragma once

#include <gtkmm/frame.h>
#include <gtkmm/box.h>
#include <gtkmm/builder.h>
#include <glibmm/signalproxy.h>
#include <glibmm/extraclassinit.h>

namespace Event
{

class EventEntry : public Gtk::Box
{

public:
    EventEntry();
    EventEntry(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refBuilder);

    static Event::EventEntry *create();
    /**
     * @brief 设置是否可修改该事件条目
     * @param can_modify true/false 若为 true，则鼠标可选中
     */
    void set_can_modify(bool can_modify);
    /**
     * @brief 点击事件框的信号
     */
    Glib::SignalProxy<void(int, double, double)> signal_clicked();

    void set_event_name(const Glib::ustring &name);
    void set_event_describe(const Glib::ustring &describe);
    void set_event_end_time(const Glib::ustring &end_time);
    void set_group_name(const Glib::ustring &name);

private:
    bool can_modify;
    //static void class_init(void *g_class, void *);

protected:
    Glib::RefPtr<Gtk::Builder> m_refBuilder;
public:
    sigc::signal<void(void)> m_signalClicked;
};

} // namespace Event
